{template "content","header"}
<div class="ui-header">
		<a href="{APP_PATH}index.php?m=member&c=mobile" id="icoback" class="header-btn left-pos">返回</a>
		<h1 class="ui-title">充值记录</h1>
	</div>
	<div id="wrapper">
			<div class="clear">
			<? $member_db = pc_base::load_model('member_model'); ?>
			{pc:get sql="SELECT * FROM phpcms_pay_charge WHERE userid=$memberinfo[userid] ORDER BY id DESC"  page="$page" num="20" return="data"} 
			{if $data}
			<ul class="ui-listview">
			{loop $data $key $val} 
				<li><a href="###">
					<div class="score">
						{$val[price]}元
					</div>
					<div class="">
						<? 
							$sj=$member_db->query("SELECT * FROM phpcms_member_shan WHERE userid=".$val[shopid]);
							$sj=mysql_fetch_assoc($sj);
						?> 
						<h3>来自商家 : {$sj[name]}</h3>
						<p>充值时间 : {date('Y-m-d H:i:s',$val[time])}</p>
					</div>
				<!-- 	<span class="status yellow">点评</span> -->
					</a>
				</li>
			{/loop}
			</ul>
			{else}
				<p class="nocontent">当前还没有记录哦！</p>
			{/if}
<!-- 				<li><a href="###">
					<div class="">
						<h3>下一页</h3>
					</div>
					</a>
				</li> -->
			{/pc}
		</div>
		
		</div><!-- /wrapper -->
	</div>

		<script type="text/javascript">
		
			<? if($paydata['price']>$memberinfo['amount']){?>
				alert("您的余额为{$memberinfo['amount']},不足以支付{$paydata['price']}的交易,请先充值后才能进行消费");
				window.location.href='{APP_PATH}index.php?m=member&c=mobile';
			<?}?>
		
			//js模拟滚动条
			var myScroll;
			function loaded() {
				var myscroll=new iScroll("wrapper",{hScrollbar:true, vScrollbar:true});
			}

			document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
			document.addEventListener('DOMContentLoaded', loaded, false);
		</script>

</body>
</html>

{template "content","footer"}